#!/bin/bash


gnome-terminal -- bash -c "export PX4_SIM_HOST_ADDR=127.0.0.1;cd  /home/zhao/下载/jn/PX4-Autopilot/Tools; ./sitl_multiple_run.sh 3; exec bash"

# 启动 MAVROS 节点
gnome-terminal -- bash -c "export PX4_SIM_HOST_ADDR=192.168.16.98;source /opt/ros/foxy/setup.bash; ros2 run mavros mavros_node --remap __ns:=/drone_0 --ros-args -p fcu_url:=udp://:14550@localhost:14580 -p tgt_system:=1 -p gcs_url:=udp://:14550@127.0.0.1:14550;exec bash"
gnome-terminal -- bash -c "export PX4_SIM_HOST_ADDR=192.168.16.98;source /opt/ros/foxy/setup.bash; ros2 run mavros mavros_node --remap __ns:=/drone_1 --ros-args -p fcu_url:=udp://:14551@localhost:14581 -p tgt_system:=2 -p gcs_url:=udp://:14551@127.0.0.1:14551;exec bash"
gnome-terminal -- bash -c "export PX4_SIM_HOST_ADDR=192.168.16.98;source /opt/ros/foxy/setup.bash; ros2 run mavros mavros_node --remap __ns:=/drone_2 --ros-args -p fcu_url:=udp://:14552@localhost:14582 -p tgt_system:=3 -p gcs_url:=udp://:14552@127.0.0.1:14552;exec bash"
